const sequelize = require('./db')
const { DataTypes } = require('sequelize')
//定义一个管理员的模型
const Admin = sequelize.define(
  'admin',
  {
    //登录名称
    loginName: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    //登录密码
    loginPwd: {
      type: DataTypes.STRING,
      allowNull: false,
    },
  },
  {
    //避免数据删除
    paranoid: true,
  }
)
module.exports = Admin
